package com.laolu.icon.remote;

import com.sun.jna.Memory;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;


@Getter
@Slf4j
public class RemoteMemory extends RemoteMemoryOperation {
	
	/**
	 * 要写入远程进程的对象
	 */
	private final Memory DATA;
	
	public RemoteMemory(int size, @NotNull HANDLE H_PROCESS) {
		super(size, H_PROCESS);
		this.DATA = new Memory(size);
	}
	
	@Override
	public boolean write() {
		return super.write(DATA);
	}
	
	@Override
	public boolean read() {
		return super.read(DATA);
	}
	
}
